package com.warrior.entity;

import javax.persistence.*;
import java.sql.Timestamp;

@Entity
@Table(name = "introduction_content", schema = "warrior")
public class IntroductionContentEntity {

    private String id;//首页介绍信息id,用II-32位UUID 表示
    private String introductionId;//首页介绍文章主键id,用HA-32位uuid表示
    private String introductionText;//记录首页介绍文本信息
    private String introductionPicPath;//记录图片上传的路径
    private String introductionVideoPath;//记录首页介绍宣传视频的上传路径
    private Integer introductionSequence;//记录首页介绍序列,越小排名越往上
    private Timestamp createdAt;//记录该条记录的创建时间
    private Timestamp updateAt;//记录该条记录的更新时间
    private String createdBy;//记录该条记录的创建者
    private String updateBy;//记录该条记录由何人更新

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "introduction_id")
    public String getIntroductionId() {
        return introductionId;
    }

    public void setIntroductionId(String introductionId) {
        this.introductionId = introductionId;
    }

    @Basic
    @Column(name = "introduction_text")
    public String getIntroductionText() {
        return introductionText;
    }

    public void setIntroductionText(String introductionText) {
        this.introductionText = introductionText;
    }

    @Basic
    @Column(name = "introduction_pic_path")
    public String getIntroductionPicPath() {
        return introductionPicPath;
    }

    public void setIntroductionPicPath(String introductionPicPath) {
        this.introductionPicPath = introductionPicPath;
    }

    @Basic
    @Column(name = "introduction_video_path")
    public String getIntroductionVideoPath() {
        return introductionVideoPath;
    }

    public void setIntroductionVideoPath(String introductionVideoPath) {
        this.introductionVideoPath = introductionVideoPath;
    }

    @Basic
    @Column(name = "introduction_sequence")
    public Integer getIntroductionSequence() {
        return introductionSequence;
    }

    public void setIntroductionSequence(Integer introductionSequence) {
        this.introductionSequence = introductionSequence;
    }

    @Basic
    @Column(name = "created_at")
    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    @Basic
    @Column(name = "update_at")
    public Timestamp getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Timestamp updateAt) {
        this.updateAt = updateAt;
    }

    @Basic
    @Column(name = "created_by")
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Basic
    @Column(name = "update_by")
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        IntroductionContentEntity that = (IntroductionContentEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (introductionId != null ? !introductionId.equals(that.introductionId) : that.introductionId != null)
            return false;
        if (introductionText != null ? !introductionText.equals(that.introductionText) : that.introductionText != null)
            return false;
        if (introductionPicPath != null ? !introductionPicPath.equals(that.introductionPicPath) : that.introductionPicPath != null)
            return false;
        if (introductionVideoPath != null ? !introductionVideoPath.equals(that.introductionVideoPath) : that.introductionVideoPath != null)
            return false;
        if (introductionSequence != null ? !introductionSequence.equals(that.introductionSequence) : that.introductionSequence != null)
            return false;
        if (createdAt != null ? !createdAt.equals(that.createdAt) : that.createdAt != null) return false;
        if (updateAt != null ? !updateAt.equals(that.updateAt) : that.updateAt != null) return false;
        if (createdBy != null ? !createdBy.equals(that.createdBy) : that.createdBy != null) return false;
        if (updateBy != null ? !updateBy.equals(that.updateBy) : that.updateBy != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (introductionId != null ? introductionId.hashCode() : 0);
        result = 31 * result + (introductionText != null ? introductionText.hashCode() : 0);
        result = 31 * result + (introductionPicPath != null ? introductionPicPath.hashCode() : 0);
        result = 31 * result + (introductionVideoPath != null ? introductionVideoPath.hashCode() : 0);
        result = 31 * result + (introductionSequence != null ? introductionSequence.hashCode() : 0);
        result = 31 * result + (createdAt != null ? createdAt.hashCode() : 0);
        result = 31 * result + (updateAt != null ? updateAt.hashCode() : 0);
        result = 31 * result + (createdBy != null ? createdBy.hashCode() : 0);
        result = 31 * result + (updateBy != null ? updateBy.hashCode() : 0);
        return result;
    }
}
